home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / amok_lha / amok15.lha / Seafarers_Manual / Source / Fathoms.mod < prev    next >
Text File  |  1993-08-15  |  635b  |  29 lines

  1. MODULE Fathoms;   (* Convert fathoms to inches *)
  2.  
  3.    (* From the book "Modula-2  A Seafarer's Manual and Shipyard Guide" *)
  4.    (* Page 22   adapted "Amiga M2Modula-2"   21 Feb 1988 *)
  5.  
  6. FROM InOut IMPORT WriteLn,
  7.           WriteString,
  8.                   WriteInt,
  9.                   ReadInt;
  10.                   
  11. CONST
  12.   FeetInFathom = 6;
  13.   InchesInFoot = 12;
  14.   InchesInFathom = FeetInFathom * InchesInFoot;
  15.   
  16. VAR
  17.   NumFathoms,
  18.   TotalInches : INTEGER;
  19.   
  20. BEGIN
  21.   WriteString ("Enter number of fathoms: ");
  22.   ReadInt (NumFathoms);
  23.   TotalInches := NumFathoms * InchesInFathom;
  24.   WriteLn;
  25.   WriteInt (TotalInches,5);
  26.   WriteLn;
  27.   
  28. END Fathoms.
  29.